package com.webbdong.aop.agent.test.bytebuddy;

import net.bytebuddy.implementation.bind.annotation.AllArguments;
import net.bytebuddy.implementation.bind.annotation.Origin;
import net.bytebuddy.implementation.bind.annotation.RuntimeType;
import net.bytebuddy.implementation.bind.annotation.SuperCall;

import java.lang.reflect.Method;
import java.util.concurrent.Callable;

public class GeneralInterceptor {

    @RuntimeType
    public Object intercept(@AllArguments Object[] allArguments,
                            @Origin Method method, @SuperCall Callable<?> callable) throws Exception {

        System.out.println("===============================intercept");
        return callable.call();
    }
}
